I have a piece of code that is used to fetch list items from host web
function getItems() { executor = new SP.RequestExecutor(appweburl); executor.executeAsync( { url: appweburl + "/_api/SP.AppContextSite(@target)/web/lists/getbyTitle('Products')/Items?$select=Title&@target='" + hostweburl + "'", method: "GET", headers: { "Accept": "application/json; odata=verbose" }, success: onSuccess, error: onFail } ); }
However the following assignment to url property of SP.RequestExecutor is confusing
/_api/SP.AppContextSite(@target)/web/lists/getbyTitle('Products')/Items?$select=Title&@target='" + hostweburl + "'"
Is SP.AppContextSite(@target) an embedded function call inside the url to which the parameter @target is defined in the URL itself?
Is this syntax of making function calls in URL and passing parameters using @ symbol something peculiar to SharePoint REST API or of jQuery?